﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class UseErrorInfo : UserControl
    {
        uint type;
        public UseErrorInfo()
        {
            InitializeComponent();
            Setsize();
        }
        public uint Type
        {
            get
            {
                //TODO
                return type;
            }
            set
            {
                //TODO
                type = value;
            }
        }
        public Color LevelBackColor
        {
            get
            {
                //TODO
                return level.BackColor;
            }
            set
            {
                //TODO
                level.BackColor = value;
            }
        }
        public Color CodeBackColor
        {
            get
            {
                //TODO
                return code.BackColor;
            }
            set
            {
                //TODO
                code.BackColor = value;
            }
        }
        //  panl1.
        public string LevelName
        {
            get
            {
                //TODO
                return level.Text;
            }
            set
            {
                //TODO
                level.Text = value;
            }
        }
        public string InfoName
        {
            get
            {
                //TODO
                return code.Text;
            }
            set
            {
                //TODO
                code.Text = value;
            }
        }
        void Setsize()
        {
            if (this.Height < 50)
                this.Height = 50;
            code.Height = this.Height / 2 - 2;
            code.Width = this.Width - 4;
            level.Height = this.Height / 2 - 1;
            level.Width = this.Width - 4;
            level.Location = new Point(2, 2);
            code.Location = new Point(2, this.Height / 2);
        }
        private void UseErrorInfo_SizeChanged(object sender, EventArgs e)
        {
            Setsize();
            //labelSoh.Location = new Point(labelSoh.Location.X, Height);
        }
    }
}
